<?php
/**
 * @author 		: Sergio Martínez
 * @copyright 	: 23-05-2012
 * @uses 		: Definición de comportamientos generales
 * @todo 		: modules | ficha | behaviour
 * @version 	: 2.0
 */

	load_js("website/frontend/plugins/jquery/jquery-printarea/jquery.printArea.js");
	load_css("website/frontend/modules/ficha/css/ficha.css","print");
	//load_css("website/frontend/css/layout.css","print");
	load_js("http://maps.googleapis.com/maps/api/js?sensor=true");
	irAlListado($_GET['type']);

	if (isset($_GET["id"]) && intval($_GET["id"]) > 0) {
		$id = $_GET["id"];
		$object->traerDatos($id);
		$galeria = @$ob_gal->traerTodo("fk_id_inmueble={$id} AND tipo_inmueble={$tipo_inmueble} ORDER BY orden ASC","id,url");
	} else irAlListado($_GET['type']);
	
	if (isset($_POST["form-action"])) {
		autoload_itemsform();
		include ("modules/".$glb_section."/actions/".$glb_action."/controller.php");
		irAlListado("list");
	}
?>